home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / pvm34b3.zip / pvm34b3 / pvm3 / Readme.mp < prev    next >
Text File  |  1997-07-22  |  20KB  |  517 lines

  1. This is a supplement to the main Readme file. The reader should consult
  2. that file for more information.
  3.  
  4.  
  5. Table of Contents
  6. -----------------
  7.  
  8. 1. MPP vs. Workstation Cluster
  9. 2. Usage
  10. 3. iPSC/860
  11. 4. Paragon
  12. 5. CM5
  13. 6. IBM SP2
  14.     AIX 3.x
  15.     AIX 4.x
  16. 7. Shared-memory Systems
  17.     Solaris 2.3
  18.     SGI 5.1
  19.  
  20.  
  21. 1. Massively Parallel Systems vs. Workstation Cluster
  22. -----------------------------------------------------
  23.  
  24.     In the workstation environment, there is usually one (or a few at
  25. the most) task(s) and one PVM Daemon (pvmd) on each host. On a MPP
  26. machine, however, only one pvmd runs on the front-end and it has to
  27. support all the tasks running on the back-end nodes. On an SP, the
  28. node on which PVM is started becomes the front-end.
  29.  
  30.     On a MPP machine tasks are always spawned on the back-end nodes.
  31. If you want to start a task on the front-end you have to run it as a 
  32. Unix process, which then connects to the pvmd by calling pvm_mytid(). 
  33. Tasks to be run on the front-end should be linked with the socket-
  34. based libpvm3.a (i.e., compiled with the option "-lpvm3"), while tasks
  35. to be spawned on the back-end must be linked with libpvm3pe.a (i.e.,
  36. compiled with the option "-lpvm3pe").
  37.  
  38.     On the Paragon, tasks running on the back-end communicate with
  39. one another directly, but packets going to another machine or to a
  40. task on the front-end must be relayed by pvmd. To get the best 
  41. performance, the entire program should run on the back-end. If you 
  42. must have a master task running on the front-end (to read input from 
  43. the user terminal, for example), the master should avoid doing any 
  44. compute-intensive work.
  45.  
  46.     On the CM5 and SP, each batch of tasks created by pvm_spawn() 
  47. form a unit. Within the same unit, message are passed directly. For 
  48. each unit, PVM spawns an additional task to relay messages to and from 
  49. pvmd, because tasks in the unit cannot communicate with pvmd directly. 
  50. Communication between different units must go through pvmd. To get the
  51. best performance, try to spawn all your tasks together.
  52.  
  53.     The system supports on nodes of some MPP machines are limited.
  54. For example if your program forks on a node, the behavior of the new
  55. process is machine-dependent. In any event it would not be allowed
  56. to become a new PVM task. 
  57.  
  58.     Inter-host task-to-task direct routing via a TCP socket connection 
  59. has not been implemented on the nodes. Setting the PvmRouteDirect option
  60. on a node has no effect. 
  61.  
  62.     PVM message tags above 999999000 are reserved for internal use.
  63.  
  64.     You should not have to make any changes in your source code when you
  65. move your PVM program from a workstation cluster to a MPP, unless your
  66. program contains machine-dependent code. You do need to, however, modify
  67. the makefile to link in the approriate libraries. In the examples 
  68. directory, you'll find a special makefile for each MPP architecture, 
  69. hidden under the ARCH directory. On some MPP you must use a special 
  70. compiler or loader to compile your program.
  71.  
  72.  
  73.  
  74. 2. Usage
  75. --------
  76.  
  77.     Once properly installed, PVM can be started on a MPP by simply typing 
  78. pvm or pvmd&. Although a MPP has many nodes, it is treated as a single 
  79. host in PVM, just like a workstation. PVM has access to all the nodes in
  80. the default partition. To run a program in parallel, the user spawns a 
  81. number of tasks, which will be loaded onto different nodes by PVM. The 
  82. user has no control of how the tasks are distributed among the nodes.
  83. So running a parallel program on a MPP is like running it on a very 
  84. powerful uniprocessor machine with multitasking. For example, to run 
  85. nntime program on the IBM SP, we first start PVM on the high performance
  86. switch, and then spawn 2 copies of nntime from the console:
  87.  
  88. r25n15% pvm3/lib/pvm -nr25n15-hps
  89. pvm> conf
  90. 1 host, 1 data format
  91.                     HOST     DTID     ARCH   SPEED
  92.               r25n15-hps    40000   SP2MPI    1000
  93. pvm> spawn -2 -> nntime
  94. [1]
  95. 2 successful
  96. t60000
  97. t60001
  98. pvm> [1:t60000] t60001: 100000 doubles received correctly
  99. [1:t60000] 
  100. [1:t60000] 
  101. [1:t60000] t60000: 100000 doubles received correctly
  102. [1:t60000] 
  103. [1:t60000] 
  104. [1:t60000] Node-to-node Send/Ack
  105. [1:t60000] 
  106. [1:t60000] Roundtrip T = 90 (us)  (0.0000 MB/s)      Data size: 0
  107. [1:t60000] Roundtrip T = 105 (us)  (1.5238 MB/s)      Data size: 80
  108. [1:t60000] Roundtrip T = 207 (us)  (7.7295 MB/s)      Data size: 800
  109. [1:t60000] Roundtrip T = 920 (us)  (17.3913 MB/s)      Data size: 8000
  110. [1:t60000] Roundtrip T = 5802 (us)  (27.5767 MB/s)      Data size: 80000
  111. [1:t60000] Roundtrip T = 47797 (us)  (33.4749 MB/s)      Data size: 800000
  112. [1:t60001] EOF
  113. [1:t60000] EOF
  114. [1] finished
  115. pvm> halt
  116. r25n15%
  117.  
  118. To run nntime from command line and not from the console you can use
  119. the starter program provided in the examples directory.
  120. r25n15% pvm3/lib/pvm -nr25n15-hps
  121. pvm> conf
  122. 1 host, 1 data format
  123.                     HOST     DTID     ARCH   SPEED
  124.               r25n15-hps    40000   SP2MPI    1000
  125. pvm> quit
  126.  
  127. r25n15% bin/SP2MPI/starter -n 2 nntime
  128.  
  129.     There is no need to "add" any nodes, "conf" showed only one host. We 
  130. note that nntime is a true "hostless" (SPMD) program in the sense that it has
  131. no master task. The spmd example, on the other hand, has a master
  132. task which spawns other slave tasks. Hostless programs perform better
  133. than master-slave programs because all the tasks can be spawned together
  134. onto back-end nodes.
  135.  
  136.     PVM does not distinguish between a multiprocessor system and a
  137. uniprocessor system. While machine-specific information such as the
  138. number of processors and the power of individual processor would be 
  139. useful for load-balancing purpose, PVM neither supplies nor makes use
  140. of such information. 
  141.  
  142.  
  143.  
  144. 3. iPSC/860
  145. -----------
  146.  
  147.     This port was developed on an iPSC/860 with 128 nodes, using an
  148. SRM as its front-end. Compiling and installing on a remote host may
  149. require extensive knowledge of Intel software.
  150.  
  151.  
  152. INSTALLATION
  153.  
  154.     Type "make" on the SRM front-end to build pvmd and libpvm3.a, and 
  155.         make PVM_ARCH=CUBE
  156. to build libpvm3pe.a on a machine (SRM or workstation) that has the 
  157. icc/if77 i860 cross-compilers.
  158.  
  159.     To make the examples, repeat the above steps in the "examples"
  160. directory but use ../lib/aimk instead of make. (Note that aimk ---
  161. and pvmd, pvmgetarch, etc. --- is a sh script. You have to run them
  162. under sh instead of csh. The i386 frontend running sysV3.2 does not 
  163. understand #!, so you have to put a blank line at the beginning of
  164. the scripts.)
  165.  
  166.     To build pvmd and libpvm3.a on a remote host (Sun/SGI) instead of
  167. the SRM, try 
  168.         make PVM_ARCH=I860
  169. You may have to add a -L option to the definition of ARCHDLIB and a 
  170. -I option to ARCHCFLAGS in conf/I860SUN4.def (or conf/I860SGI.def) 
  171. to include the path of libhost.a and cube.h .
  172.  
  173.  
  174.  
  175. APPLICATION PROGRAMS
  176.  
  177.     Host (master) programs should be linked with pvm3/lib/I860/libpvm3.a 
  178. and the SRM system library libsocket.a, node (slave) programs with 
  179. pvm3/lib/ARCH/libpvm3pe.a and libnode.a .  Fortran programs should
  180. also be linked with pvm3/lib/I860/libfpvm3.a (host program) or
  181. pvm3/lib/I860/libfpvm3pe.a (node program).
  182.  
  183.     The programs in the gexamples directory have NOT been ported. The
  184. user must modify the makefiles to link to the appropriate libraries.
  185.  
  186.  
  187. BUGS AND TIPS
  188.  
  189.     a) On the SRM pvm is slow to start and it may sometimes time out and
  190. print out the message "can't start pvmd", while in fact pvmd has already
  191. been started. When this happens, just run pvm again and it'll connect
  192. to the pvmd. If you start the pvm console on another machine and add the
  193. I860 host to the configuration then this should not occur.
  194.  
  195.     b) To use PVM on a remote host you have to start "pvm3/lib/I860/pvmd"
  196. manually in the background, because PVM has no way of knowing that your
  197. workstation is being used as a front-end to the hypercube. PVM relies on
  198. the shell script "pvm3/lib/pvmd" to determine the architecture of your
  199. system, you can hack the script to make it do what you want.
  200.  
  201.     c) If PVM cannot obtain a cube of the size you specify because none
  202. is available, it will return the error "Out of resources".
  203.  
  204.     d) The function pvm_spawn() will NOT return until all spawned tasks
  205. check in with PVM. Therefore slave tasks should call pvm_mytid() before
  206. starting any heavy duty computation.
  207.  
  208.     e) The only signal that can be sent to tasks running on the cube is
  209. SIGKILL. Any other signals will be ignored.
  210.  
  211.     f) All spawned tasks should call pvm_exit() just before they exit.
  212. Pvmd will release the cube after all tasks loaded into the cube have
  213. called pvm_exit(). If any task attempts to continue execution after
  214. it called pvm_exit(), it'll be terminated when the cube is released.
  215.  
  216.     g) There is a constant TIMEOUT in the file "pvmmimd.h" that controls 
  217. the frequency at which the PVM daemon probes for packets from node tasks.
  218. If you want it to respond more quickly you can reduce this value. 
  219. Currently it is set to 10 millisecond.
  220.  
  221.     h) DO NOT use any native NX message passing calls in PVM or they
  222. may interfere with pvm_send()/pvm_recv().
  223.  
  224.     i) Messages printed to "stderr" by node tasks do not end up in
  225. the log file "/tmp/pvml.uid".
  226.  
  227.     j) The "argv" argument to pvm_spawn() is quietly ignored.
  228.  
  229.  
  230.  
  231. 4. Paragon
  232. ----------
  233.  
  234.     This port has been tested on a Paragon XPS5 running R1.3. The support
  235. and information provided by Intel engineers are gratefully acknowledged.
  236.  
  237.  
  238. INSTALLATION
  239.  
  240.     Type "make" in this directory on the Paragon. To build on a cross-
  241. compiler machine, you need to type
  242.         setenv PVM_ARCH PGON
  243.         make -e
  244. The environmental variable PARAGON_XDEV must be set to the proper base 
  245. directory in the later case.
  246.  
  247.     To make the examples, go to the "examples" directory and repeat the
  248. above procedure but use ../lib/aimk instead of make.
  249.  
  250. STARTING THE PVMD WITH PEXEC
  251.  
  252. Many Paragon sites use the program "pexec" to manage partitions for 
  253. application programs. The pvmd startup script has been modified to
  254. use pexec, if it exists.  The environment variable NX_DFLT_SIZE should
  255. be set in the user's .cshrc file and is the size (with a default of 1) 
  256. of the partition that the pvmd will manage. The partition size can also be 
  257. set by invoking the pvmd with the command
  258.        % pvmd [pvmd options] -sz <part_size> 
  259.  
  260. The "pexec" program should exist in /bin/pexec. If it exists in another
  261. location, modify the  pvm3/lib/pvmd startup script to point at the
  262. site-specific location or have the system administrator make the 
  263. appropriate link.
  264.  
  265. If a PGON is the first ("master") host in the virtual machine, the
  266. pvmd should be started first, and then the console may be started:
  267.        % pvmd -sz <partsize> & 
  268.        % pvm
  269. Other hosts, including other Paragons, may then be added using the console.
  270.        pvm> add other_pgon
  271.        pvm> add my_workstation
  272.        
  273. APPLICATION PROGRAMS
  274.  
  275.     Host (master) programs should be linked with pvm3/lib/PGON/libpvm3.a
  276. and the system library librpc.a, node (slave) programs with
  277. pvm3/lib/PGON/libpvm3pe.a, libnx.a, and librpc.a . Fortran programs should
  278. also be linked with pvm3/lib/PGON/libfpvm3.a .
  279.  
  280.     The programs in the gexamples directory have NOT been ported. The
  281. user must modify the makefiles to link to the appropriate libraries.
  282.  
  283. NATIVE MODE COLLECTIVE OPERATIONS
  284.     
  285.     If possible, native mode collective operations such as gsync,
  286. gisum, and gdsum are used for group operations.  The native operations
  287. will be used if all of following hold 
  288.       a) A native collective operation exists on the Paragon
  289.       b) All the nodes in the paragon compute partition are participating
  290.          in the collective operation (pvm_barrier, pvm_reduce, etc.)
  291.       c) The group has been made static with pvm_freezegroup
  292.  
  293. If all three conditions do not hold, the collective operation still functions
  294. correctly, but does not use native operations. If all the PGON nodes are part
  295. of a larger group, the native operations are used for the PGON part of the 
  296. collective operation. 
  297.  
  298. BUGS AND CAVEATS
  299.  
  300.     a) Tasks spawned onto the Paragon run on the compute nodes by default.
  301. Host tasks run on the service nodes and should be started from a Unix
  302. prompt.
  303.  
  304.     b) By default PVM spawns tasks in your default partition. You can use
  305. the NX command-line options such as "-pn partition_name" to force it to
  306. run on a particular partition or "-sz number_of_nodes" to specify the
  307. number of nodes you want it to use. Setting the environmental variable 
  308. NX_DFLT_SIZE would have the same effect. For example starting pvmd with
  309. the following command
  310.         pvmd -pn pvm -sz 33
  311. would force it to run on the partition "pvm" using only 33 nodes (there
  312. must be at least that many nodes in the partition).
  313.  
  314.     c) The current implementation only allows one task to be spawned on
  315. each node.
  316.  
  317.     d) There is a constant TIMEOUT in the file "pvmmimd.h" that controls 
  318. the frequency at which the PVM daemon probes for packets from node tasks. 
  319. If you want it to respond more quickly you can reduce this value. 
  320. Currently it is set to 10 millisecond.
  321.  
  322.     e) DO NOT use any native NX message passing calls in PVM or they
  323. may interfere with pvm_send()/pvm_recv().
  324.  
  325.     f) PVM programs compiled for versions earlier than 3.3.8 need to
  326. be recompiled.  A small change in data passed to node tasks on startup
  327. will cause earlier programs to break. 
  328.  
  329.  
  330. 5. CM5
  331. ------
  332.  
  333.     This port was developed on a 32-node CM5 running CMOST v7.2 and
  334. CMMD3.0. We gratefully acknowledge the supports and information provided
  335. by engineers of Thinking Machines Corp.
  336.  
  337.  
  338. INSTALLATION
  339.  
  340.     Type "make" in this directory.
  341.  
  342.     To make the examples, go to the "examples" directory and type
  343.         ../lib/aimk default
  344.  
  345.  
  346. APPLICATION PROGRAMS
  347.  
  348.     Host (master) programs should be linked with pvm3/lib/CM5/libpvm3.a .
  349. Node (slave) programs need to be linked to pvm3/lib/CM5/libpvm3pe.a and 
  350. joined with pvm3/lib/CM5/pvmhost.o and pvm3/lib/CM5/libpvm3.a using the
  351. CMMD loader "cmmd-ld". Fortran programs should also be linked with 
  352. pvm3/lib/CM5/libfpvm3.a .
  353.  
  354.     The programs in the gexamples directory have NOT been ported. The
  355. user must modify the makefiles to link to the appropriate libraries.
  356.  
  357.  
  358. BUGS
  359.  
  360.     a) The function pvm_kill() does not behave like a Unix kill: it
  361. will delete the target task from PVM's task queue but doesn't actually
  362. kill the task. 
  363.  
  364.     b) Signals sent by pvm_sendsig() are simply discarded, except for
  365. SIGTERM and SIGKILL, which are equivalent to calling pvm_kill().
  366.  
  367.     c) You're not allowed to spawn more tasks than the number of nodes
  368. available in your partition in one call to pvm_spawn().
  369.  
  370.     d) If you kill the node tasks from PVM (e.g., using pvm_kill), the
  371. node processes will dump core files into your HOME directory. I don't
  372. consider this to be a PVM bug.
  373.  
  374.  
  375.  
  376. 6. IBM SP2
  377. ----------
  378.  
  379.     This implementation is built on top of MPI-F, IBM's version of the
  380. Message Passing Interface. Information provided by Hubertus Franke of
  381. IBM T. J. Watson Research Center is gratefully acknowledged.
  382.  
  383.  
  384. KEY FOR OPERATING SYSTEM VERSION
  385.  
  386.     Based on the AIX version on your SP2, insert one of the following 
  387. architecture designations for "<AIX_Arch>" in the discussion below.
  388.                                ^^^^^^^^^^
  389.  
  390.     for AIX 3.x        use SP2MPI
  391.     for AIX 4.x        use AIX4SP2
  392.  
  393.  
  394. INSTALLATION
  395.  
  396.     Type "make PVM_ARCH=<AIX_Arch>" in this directory.  Make sure the
  397. mpicc compiler is in your path.
  398.  
  399.     To make the examples, go to the "examples" directory, and type
  400.         setenv PVM_ARCH <AIX_Arch>; ../lib/aimk
  401.  
  402.  
  403. APPLICATION PROGRAMS
  404.  
  405.     Host (master) programs should be linked with:
  406.         pvm3/lib/<AIX_Arch>/libpvm3.a .
  407.  
  408.     Node (slave) programs must be compiled with the mpicc compiler for
  409. a C program and mpixlf compiler for a FORTRAN program, and then linked with
  410. pvm3/lib/<AIX_Arch>/libpvm3pe.a . FORTRAN programs should also be linked with 
  411. pvm3/lib/<AIX_Arch>/libfpvm3.a .
  412.  
  413.     The programs in the gexamples directory have NOT been ported. The
  414. user must modify the makefiles to link to the appropriate libraries.
  415.  
  416.  
  417. BUGS AND CAVEATS
  418.  
  419.     a) The user is required to set MP_PROCS and MP_RMPOOL environment
  420. variables or provide a node file (MP_HOSTFILE) for the SP that lists
  421. all the nodes the user intends to run PVM on. This is not to be confused 
  422. with the PVM hostfile. Before starting PVM, the POE environment variable
  423. MP_HOSTFILE should be set to the path of the user's SP node file. For
  424. example I have the line "setenv MP_HOSTFILE ~/host.list" in my .cshrc file.
  425. My host.list file contains the names of the high-performance switches on 
  426. all the parallel nodes.  If you do not want to use the SP node file, then you
  427. can set MP_PROCS to the maximum number of nodes you will need plus one.  The
  428. number listed here should be equal to the number of nodes you would have
  429. listed in the MP_HOSTFILE.  So if you need a 5 task job then you will need
  430. to set MP_PROCS=6 and if you need spawned two 5 task jobs then you will
  431. need to set MP_PROCS=12.  MP_RMPOOL is set to default value of "1" but
  432. you may need to change it depending how your administrator has allocated
  433. the SP nodes into different pools.  You can run "/usr/bin/jm_status -P"
  434. to see what POOL id's and nodes are available.
  435.  
  436.     b) On a SP node only one process can use the switch (User Space)
  437. at any given time.  If you want to share the switch between different
  438. users then you will need to run in IP mode over the switch.  To do this, 
  439. you must set "setenv MP_EUILIB ip" before starting PVM.  The default value 
  440. for "MP_EUILIB" is "us".  These environment variables should be set
  441. before starting PVM and this configuration will last until PVM is halted.
  442. To run your program you need one node for each PVM task, plus one for the 
  443. PVM host process that relays messages for pvmd. So if you want to spawn 8 
  444. PVM tasks, for instance, you'll need at least 9 node names in your SP 
  445. node file. Remember there is a host process for each group of tasks spawned
  446. together. If you spawn 8 tasks in two batches, you'll need 10 nodes instead
  447. of 9.
  448.  
  449.     c) Signals sent by pvm_sendsig() are simply discarded, except for
  450. SIGTERM and SIGKILL, which are equivalent to calling pvm_kill().
  451.  
  452.     d) If you kill one PVM task using pvm_kill(), all the tasks spawned
  453. together will also die in sympathy.
  454.  
  455.     e) To get the best performance for communications that involves pvmd,
  456. for example when you pass messages between two group of tasks spawned
  457. separately, use switch names in the node file instead of the host names,
  458. and start pvm with the -nswitchname option. This would force any socket
  459. communication to go over the high-performance switch rather than Ethernet.
  460.  
  461.  
  462.  
  463. 5. Shared-memory Systems
  464. ------------------------
  465.  
  466.     These ports achieve better performance by using shared memory instead
  467. of sockets to pass messages. They're fully compatible with the socket
  468. version. The original socket library has been renamed libpvm3s.a, users
  469. can link their programs with -lpvm3s if they would rather use sockets
  470. than shared memory. In addition, tasks linked to different PVM libraries
  471. can coexist and communicate with each other. (These messages have to be
  472. routed by the PVM daemon.)
  473.  
  474.  
  475. BUGS AND CAVEATS
  476.  
  477.     a) Messages are sent directly, pvm_setopt(PvmRoute, PvmRouteDirect)
  478. has no effect. The sender will block if the receiving buffer is full. This 
  479. could lead to deadlocks.
  480.  
  481.     b) The buffer size used by PVM, SHMBUFSIZE, is defined in 
  482. pvm3/src/pvmshmem.h, with a default of 1MBytes. You can change the buffer 
  483. size by setting the environment variable PVMBUFSIZE before starting PVM.
  484. Note that the default system limit on shared-memory segment size (1 MB on
  485. Sun's) may have to be raised as well.
  486.  
  487.     c) PVM uses the last 10 bits of the Unix user ID as the base for the
  488. shared-memory keys. If there is a conflict with keys used by another user
  489. or application, you can set the environment variable PVMSHMIDBASE to a
  490. different value.
  491.  
  492.     d) If PVM crashes for any reason, you may have to remove the leftover
  493. shared-memory segments and/or semaphores manually. Use the Uhix command
  494. `ipcs` to list them and `ipcrm` to delete them.  Or, use the script
  495. `ipcfree` in $PVM_ROOT/lib.
  496.  
  497.     e) For best performance, use psend/precv. If you must use the standard
  498. send/recv, the InPlace encoding should be used where appropiate.
  499.  
  500.  
  501. Solaris2.4
  502. ----------
  503.  
  504. APPLICATION PROGRAMS
  505.  
  506.     All PVM programs must be linked with the thread library (-lthread).
  507. Refer to the example Makefile (pvm3/examples/SUNMP/Makefile) for 
  508. details.
  509.  
  510. BUGS AND CAVEATS
  511.  
  512.     a) There is a system limit on the number of shared-memory segments
  513. a process can attach to. This in turn imposes a limit on the number of
  514. PVM tasks allowed on a single host. According to Sun Microsystem, the
  515. system parameter can be set by a system administrator:
  516.  
  517.